home *** CD-ROM | disk | FTP | other *** search
- ASSIGN
-
- Controls assignment of logical device names to files or directories.
-
- Format
-
- ASSIGN [<name>:] [{<target>}] [LIST] [EXISTS] [DISMOUNT] [DEFER] [PATH] [ADD]
- [REMOVE] [VOLS] [DIRS] [DEVICES]
-
- Template
-
- NAME,TARGET/M,LIST/S,EXISTS/;,DISMOUNT/S,DEFER/S,PATH/S,ADD/S,REMOVE/S,VOLS/S
- ,DIRS/S,DEVICES/S
-
- Location
-
- C:
-
- ASSIGN allows references to files or directories with short, convenient
- logical device names, rather than their usual names or complete paths. The
- ASSIGN command can create assignments, remove assignments, or list some or
- all current assignments.
-
- If the <name> and {<target>} arguments are given, ASSIGN assigns the given
- logical name to the specified target. Each time the assigned logical device
- name is referred to, AmigaDOS accesses the specified target. If the <name>
- given is already assigned to a file or directory, the new target replaces the
- previous one. A colon must be included after the <name> argument.
-
- If only the <name> argument is given, any existing ASSIGN of a file or
- directory to that logical device name is cancelled.
-
- You can assign several logical device names to the same target by using
- multiple ASSIGN commands.
-
- You can assign one logical device name to several targets by specifying each
- file or directory after the <name> argument or by using several ASSIGN
- commands with the ADD option. Specifying the ADD option does not replace any
- existing target assigned to <name>. This target is added to the ASSIGN list
- and the system searches for all the targets when <name> is encountered. If
- the first target is not available, ASSIGN uses the next target added.
-
- The REMOVE option deletes a target name from the ASSIGN list.
-
- If no arguments are given with ASSIGN or if the LIST keyword is used, a list
- of all current assignments is displayed. If the VOLS, DIRS, or DEVICES switch
- is specified, ASSIGN limits the display to volumes, directories, or devices.
-
- When the EXISTS keyword is entered with a logical device name, AmigaDOS
- searches the ASSIGN list for that name and displays the volume and directory
- assigned to that device. If the device name is not found, the condition flag
- is set to 5 (WARN).
-
- When the {<target>} argument is given, AmigaDOS immediately looks for that
- file or directory. If the ASSIGN commands are part of the User-startup, the
- targets must be present on a mounted disk during the boot procedure. If an
- assigned target cannot be found, a requester asks for the volume containing
- it. However, using the DEFER and PATH options make the system wait until the
- target is needed before searching for it.
-
- Note:
-
- The assigned name does not have to retain the name of the file or directory
- and it does not have to be in upper case. For example, the name CLIPS: or
- Clips: can be assigned to the Ram Disk:Clipboards directory.
-
- The DEFER option creates a late-binding ASSIGN. This ASSIGN takes effect when
- the assigned object is first referenced, rather than when the assignment is
- made. When the DEFER option is used, the disk containing the assigned target
- is not needed until the object is called. The assignment then remains valid
- until explicitly changed.
-
- If you ASSIGN FONTS: to DF0:Fonts with the DEFER option, the system
- associates FONTS: with the disk that is in DF0: when FONTS: is referred to.
- For example, if you have a Workbench disk in DF0: at the time the FONTS:
- directory is needed, the system associates FONTS: with that particular
- Workbench disk. If you later remove that Workbench disk and insert another
- disk containing a Fonts directory, the system specifically requests the
- original Workbench disk the next time FONTS: is needed.
-
- The PATH option creates a non-binding ASSIGN. A non-binding ASSIGN acts like
- a DEFERed ASSIGN, except that is re-evaluated each time the assigned name is
- referenced. For example, if you assign FONTS: to DF0:Fonts with the PATH
- option, any disk in DF0: is searched when FONTS: is referenced. As long as
- the disk contains a Fonts directory, it satisfies the ASSIGN. You cannot
- assign multiple directories with the PATH option.
-
- Floppy disk only system users can find that using the PATH option eliminates
- the need to reinsert the original Workbench disk used to boot the system. As
- long as the drive you assigned with the PATH option contains a disk with the
- assigned directory name, the system uses that disk.
-
- The DISMOUNT option disconnects a volume or device from the list of mounted
- devices. You must provide the device name in the argument. DISMOUNT removes
- the name form the list, but does not free resources. You cannot cancel a
- DISMOUNT without rebooting. DISMOUNT is meant for use by software developers
- only and can cause a software failure if not used carefully.
-
- Example 1:
-
- 1> ASSIGN FONTS: MyFonts:Fontdir
-
- assigns the FONTS: directory to Fontdir on MyFonts:
-
- Example 2:
-
- 1> ASSIGN LIST
- Volumes:
- Ram Disk [Mounted]
- Workbench [Mounted]
- MyFonts [Mounted]
-
- Directories:
- LOCALE Workbench:Locale
- KEYMAPS Workbench:Devs/Keymaps
- PRINTERS Workbench:Devs/Printers
- REXX Workbench:S
- CLIPS Ram Disk:Clipboards
- ENV Ram Disk:Env
- T Ram Disk:T
- ENVARC Workbench:Prefs/Env-Archive
- SYS Workbench:
- C Workbench:C
- S Workbench:S
- L Workbench:L
- FONTS MyFonts:Fontdir
- DEVS Workbench:Devs
- LIBS Workbench:Libs
- + Workbench:Classes
-
- Devices:
- PIPE AUX RAM CON
- RAW PAR SER PRT DF0
-
- Shows a typical list of all current assignments. The plus sign indicates any
- additional directories with the same assignment.
-
- Example 3:
-
- 1> ASSIGN FONTS: EXISTS
- FONTS: MyFonts:FontDir
-
- is an inquiry into the assignment of FONTS:. AmigaDOS responds by showing
- that FONTS: is assigned to the FontDir directory of the MyFonts volume. The
- return code is set to 0 if it exists or to 5 if it does not.
-
- Example 4:
-
- 1> ASSIGN LIBS: SYS:Libs BigAssem:Libs ADD
-
- is a multiple-directory assignment that creates a search path containing two
- Libs directories. Specifying ADD keeps the standard SYS:Classes assignment
- from being removed. These directories are searched in sequence each time
- LIBS: is invoked.
-
- Example 5:
-
- 1> ASSIGN DEVS:
-
- removes the DEVS: assignment from the system.
-
- Example 6:
-
- 1> ASSIGN WorkDisk: DF0: DEFER
- 1> ASSIGN WorkDisk: EXISTS
- WorkDisk <DF0:>
-
- sets up a late-binding assignment of the logical device WorkDisk:. Until the
- first time you refer to the name WorkDisk:, you do not need to insert it in
- DF0: ASSIGN shows DF0: enclosed in angle brackets to indicate that it is
- DEFERred. After the first reference to WorkDisk:, the volume name of the disk
- that was in DF0: replaces <DF0:>.
-
- Example 7:
-
- 1> ASSIGN C: DF0:C PATH
- 1> ASSIGN C: EXISTS
- C [Df0: C]
-
- references the C directory fo the disk that is in DF0: when a command is
- searched for. ASSIGN shows DF0:C in square brackets to indicate that it is a
- non-binding ASSIGN.
-
- Example 8:
-
- 1> ASSIGN LIBS: Zcad:Libs ADD
-
- adds Zcad:Libs to the list of directories assigned as LIBS:.
-
- Example 9:
-
- 1> ASSIGN LIBS: Zcad:Libs REMOVE
-
- removes Zcad:Libs from the list of directories assigned as LIBS:.
-
- For more examples using ASSIGN, see Chapter 8.
-